Get Card Details
The GET_CARD_DETAILS API provides a secure way to retrieve card details without exposing sensitive information. This API is designed to interact with XD Ledger while ensuring compliance with data protection policies.
Method: POST
{{URL}}/cardv2
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Request Parameters
Parameter | Description |
---|---|
method Mandatory | String API method name Constant value – "LEDGER_CARD_REQUEST" |
id Mandatory | String Unique request identifier |
reference Optional | String Unique reference ID of the request |
transactionType Mandatory | String The type of Operation/transaction Constant value – "GET_CARD_DETAILS" |
customerId Mandatory | String Unique customer identifier |
accountNumber Mandatory | String Account number linked to the Card |
product Mandatory | String Name of the product associated with the card Sample value – "DEFAULT" |
channel Mandatory | Enum Processing channel through which the card transaction happens Valid Values: PULSE VISADPS Sample value – "VISADPS" |
program Mandatory | String Name of the program to which the card product is mapped Sample value – "DEFAULT" |
cardId Mandatory | String Unique identifier of the card Sample value – "e09e3f57908041a2891da8ed90a17f26" |
credential Mandatory | String API credential for authentication |
signature Mandatory | String Signature for request validation |
apiKey Mandatory | String API Key for authentication |
- cURL
- C#
- Go
- NodeJS
curl --location 'http://localhost:5010/PL/cardv2' \
--header 'Signature: keyId=12009,algorithm=ecdsa-sha256,signature=MEUCIQC+3uXE6OT4o8ZJdOTmbz2CEh3zb6FE3faVvUmJ7L0BMAIgUJuCyx+zKEhruVWtKLcdNE8zkr+IvBMtrGWmqbb8s7E=' \
--header 'Content-Type: application/json' \
--data '{"method":"ledger.CARD.request","id":"1","params":{"api":{"credential":"Basic cmFqYXJlcEBuZXR4ZC5jb206MDM1Nzg2MmYxYTk4NDc3OGE0ZDU4NGE2YzBjYTMyNzM=","signature":"MEQCIAxYsqc6EzaeKfCvj/BBC621WKB8NuQZ0/FdcnJSnyV+AiAkcADTJStpy42g9uk/D2uEJXtFXGUyJIP5LEf7mpITJg==","apiKey":"0357862f1a984778a4d584a6c0ca3273"},"payload":{"reference":"REF-1632316373248","product":"DEFAULT","program":"DEFAULT","channel":"VISA_DPS","transactionType":"GET_CARD_DETAILS","customerId":"100000000004001","accountNumber":"123456775261215","cardId":"2ebf0a86229a441d94d6b1c3294cdaeb","cardHolderId":"CH00000000004001"}}}'
var options = new RestClientOptions("http://localhost:5010")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/PL/cardv2", Method.Post);
request.AddHeader("Signature", "keyId=12009,algorithm=ecdsa-sha256,signature=MEUCIQC+3uXE6OT4o8ZJdOTmbz2CEh3zb6FE3faVvUmJ7L0BMAIgUJuCyx+zKEhruVWtKLcdNE8zkr+IvBMtrGWmqbb8s7E=");
request.AddHeader("Content-Type", "application/json");
var body = @"{""method"":""ledger.CARD.request"",""id"":""1"",""params"":{""api"":{""credential"":""Basic cmFqYXJlcEBuZXR4ZC5jb206MDM1Nzg2MmYxYTk4NDc3OGE0ZDU4NGE2YzBjYTMyNzM="",""signature"":""MEQCIAxYsqc6EzaeKfCvj/BBC621WKB8NuQZ0/FdcnJSnyV+AiAkcADTJStpy42g9uk/D2uEJXtFXGUyJIP5LEf7mpITJg=="",""apiKey"":""0357862f1a984778a4d584a6c0ca3273""},""payload"":{""reference"":""REF-1632316373248"",""product"":""DEFAULT"",""program"":""DEFAULT"",""channel"":""VISA_DPS"",""transactionType"":""GET_CARD_DETAILS"",""customerId"":""100000000004001"",""accountNumber"":""123456775261215"",""cardId"":""2ebf0a86229a441d94d6b1c3294cdaeb"",""cardHolderId"":""CH00000000004001""}}}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:5010/PL/cardv2"
method := "POST"
payload := strings.NewReader(`{"method":"ledger.CARD.request","id":"1","params":{"api":{"credential":"Basic cmFqYXJlcEBuZXR4ZC5jb206MDM1Nzg2MmYxYTk4NDc3OGE0ZDU4NGE2YzBjYTMyNzM=","signature":"MEQCIAxYsqc6EzaeKfCvj/BBC621WKB8NuQZ0/FdcnJSnyV+AiAkcADTJStpy42g9uk/D2uEJXtFXGUyJIP5LEf7mpITJg==","apiKey":"0357862f1a984778a4d584a6c0ca3273"},"payload":{"reference":"REF-1632316373248","product":"DEFAULT","program":"DEFAULT","channel":"VISA_DPS","transactionType":"GET_CARD_DETAILS","customerId":"100000000004001","accountNumber":"123456775261215","cardId":"2ebf0a86229a441d94d6b1c3294cdaeb","cardHolderId":"CH00000000004001"}}}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Signature", "keyId=12009,algorithm=ecdsa-sha256,signature=MEUCIQC+3uXE6OT4o8ZJdOTmbz2CEh3zb6FE3faVvUmJ7L0BMAIgUJuCyx+zKEhruVWtKLcdNE8zkr+IvBMtrGWmqbb8s7E=")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var http = require('follow-redirects').http;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'localhost',
'port': 5010,
'path': '/PL/cardv2',
'headers': {
'Signature': 'keyId=12009,algorithm=ecdsa-sha256,signature=MEUCIQC+3uXE6OT4o8ZJdOTmbz2CEh3zb6FE3faVvUmJ7L0BMAIgUJuCyx+zKEhruVWtKLcdNE8zkr+IvBMtrGWmqbb8s7E=',
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"method": "ledger.CARD.request",
"id": "1",
"params": {
"api": {
"credential": "Basic cmFqYXJlcEBuZXR4ZC5jb206MDM1Nzg2MmYxYTk4NDc3OGE0ZDU4NGE2YzBjYTMyNzM=",
"signature": "MEQCIAxYsqc6EzaeKfCvj/BBC621WKB8NuQZ0/FdcnJSnyV+AiAkcADTJStpy42g9uk/D2uEJXtFXGUyJIP5LEf7mpITJg==",
"apiKey": "0357862f1a984778a4d584a6c0ca3273"
},
"payload": {
"reference": "REF-1632316373248",
"product": "DEFAULT",
"program": "DEFAULT",
"channel": "VISA_DPS",
"transactionType": "GET_CARD_DETAILS",
"customerId": "100000000005001",
"accountNumber": "123456775261215",
"cardId": "2ebf0a96229a541d94d6bdc3294cdaeb",
"cardHolderId": "CH00000000004001"
}
}
});
req.write(postData);
req.end();
Body
{
"method": "ledger.CARD.request",
"id": "1",
"params": {
"payload": {
"reference": "DPSQA05627413",
"transactionType": "GET_CARD_DETAILS",
"customerId": "100000000019001",
"accountNumber": "653421207018416",
"product": "DEFAULT",
"channel": "VISA_DPS",
"program": "DEFAULT",
"cardId": "e01e4f57908041a1234da8ed90a15f28"
},
"api": {
"credential": "{{cred}}",
"signature": "{{signature}}",
"apiKey": "9999c17b8888123ab40c46631939c155"
}
}
}
Response: 200
Payload Parameters
Parameter | Description |
---|---|
id | String Response ID echoed from the request ID Sample Value: "1" |
api.type | String Acknowledgment type Sample value – "GET_CARD_DETAILS_ACK" |
api.reference | String Unique reference for the API response Sample Value: "REFDPSQA05627413" |
api.dateCreated | Number Unix Timestamp of the API response Created Time "1740992543" |
api. originalReference | String Original transaction reference ID from the Request Sample Value: "DPSQA05627413" |
cardDetails.cardId | String Unique identifier of the card Sample Value: "e01e4f57908041a1234da8ed90a15f28" |
cardDetails.cardProduct | String ID of the card product associated to the card Sample Value: "2c6b841a-dfc1-4a6a-a12a-13c21035b5be" |
cardDetails.createdDate | String Card creation date in ISO format Sample Value: "2025-02-17T12:04:23.112Z" |
cardDetails.updatedDate | String Last update timestamp in ISO format Sample Value: "2025-02-17T12:47:50.55Z2025-02-17T12:47:50.55Z" |
cardDetails.cardMaskNumber | String Masked card number (last 4 digits visible) Sample Value: "****5354" |
cardDetails.cardStatus | String Current status of the card Sample Value: "ACTIVE" |
cardDetails.orderStatus | String Card order status Sample Value: "ORDER_PLACED" |
cardDetails.orderId | String Unique order identifier Sample Value: "4UPFD1Q29Z2K000" |
cardDetails.isReIssue | Boolean Indicates if the card is reissued Sample Value: false |
cardDetails.isReplace | Boolean Indicates if the card is replaced Sample Value: false |
cardDetails.externalCardId | String External reference ID from Visa for tracking |
cardDetails.orderSubStatus | String Substatus that provides further details about the card order process that provides card order status provided from the Network |
cardDetails.cardExpiryDate | String Expiry Date of the card (Format: YYYYMM) Sample Value: "202702" |
{
"id": "1",
"result": {
"api": {
"type": "GET_CARD_DETAILS_ACK",
"reference": "REFDPSQA05627413",
"dateCreated": 1740992543,
"originalReference": "DPSQA05627413"
},
"cardDetails": {
"cardId": "e01e4f57908041a1234da8ed90a15f28",
"cardProduct": "2c6b841a-dfc1-4a6a-a12a-13c21035b5be",
"createdDate": "2025-02-17T12:04:23.112Z",
"updatedDate": "2025-02-17T12:47:50.55Z",
"cardMaskNumber": "************5354",
"cardStatus": "ACTIVE",
"orderStatus": "ORDER_PLACED",
"orderId": "4UPFD1Q29Z2K000",
"isReIssue": false,
"isReplace": false,
"externalCardId": "v-402-e8786c8a-cf92-48b6-97fd-545805a106c8",
"orderSubStatus": "ORDER_PENDING"
"cardExpiryDate": "202702"
}
}
}